﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using BioBooking.Data;

namespace BioBooking.Client.Screens
{
    /// <summary>
    /// Interaction logic for Hall2.xaml
    /// </summary>
    public partial class Hall2 : UserControl
    {
        BioBooking.Data.IRepository service;
        List<Seat> seats;
        Showing showing;

        public Hall2()
        {
            InitializeComponent();
            service = Repository.GetRepository();
            seats = new List<Seat>();
            showing = new Showing();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {

        }

        private void button32_Click(object sender, RoutedEventArgs e)
        {
            button32.Background = Brushes.Red;
            Seat seat32 = new Seat();
            seat32.Column = 8;
            seat32.Row = 4;
            seats.Add(seat32);
        }

        private void button54_Click(object sender, RoutedEventArgs e)
        {
            button54.Background = Brushes.Red;
            Seat seat54 = new Seat();
            seat54.Column = 3;
            seat54.Row = 6;
            seats.Add(seat54);
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            button1.Background = Brushes.Red;
            Seat seat1 = new Seat();
            seat1.Column = 1;
            seat1.Row = 1;
            seats.Add(seat1);
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            button2.Background = Brushes.Red;
            Seat seat2 = new Seat();
            seat2.Column = 2;
            seat2.Row = 1;
            seats.Add(seat2);
        }

        private void button3_Click(object sender, RoutedEventArgs e)
        {
            button3.Background = Brushes.Red;
            Seat seat3 = new Seat();
            seat3.Column = 3;
            seat3.Row = 1;
            seats.Add(seat3);
        }

        private void button4_Click(object sender, RoutedEventArgs e)
        {
            button4.Background = Brushes.Red;
            Seat seat4 = new Seat();
            seat4.Column = 4;
            seat4.Row = 1;
            seats.Add(seat4);
        }

        private void button5_Click(object sender, RoutedEventArgs e)
        {
            button5.Background = Brushes.Red;
            Seat seat5 = new Seat();
            seat5.Column = 5;
            seat5.Row = 1;
            seats.Add(seat5);
        }

        private void button6_Click(object sender, RoutedEventArgs e)
        {
            button6.Background = Brushes.Red;
            Seat seat6 = new Seat();
            seat6.Column = 6;
            seat6.Row = 1;
            seats.Add(seat6);
        }

        private void button7_Click(object sender, RoutedEventArgs e)
        {
            button7.Background = Brushes.Red;
            Seat seat7 = new Seat();
            seat7.Column = 7;
            seat7.Row = 1;
            seats.Add(seat7);
        }

        private void button8_Click(object sender, RoutedEventArgs e)
        {
            button8.Background = Brushes.Red;
            Seat seat8 = new Seat();
            seat8.Column = 8;
            seat8.Row = 1;
            seats.Add(seat8);
        }

        private void button42_Click(object sender, RoutedEventArgs e)
        {
            button42.Background = Brushes.Red;
            Seat seat42 = new Seat();
            seat42.Column = 9;
            seat42.Row = 1;
            seats.Add(seat42);
        }

        private void button43_Click(object sender, RoutedEventArgs e)
        {
            button43.Background = Brushes.Red;
            Seat seat43 = new Seat();
            seat43.Column = 10;
            seat43.Row = 1;
            seats.Add(seat43);
        }

        private void button9_Click(object sender, RoutedEventArgs e)
        {
            button9.Background = Brushes.Red;
            Seat seat9 = new Seat();
            seat9.Column = 1;
            seat9.Row = 2;
            seats.Add(seat9);
        }

        private void button10_Click(object sender, RoutedEventArgs e)
        {
            button10.Background = Brushes.Red;
            Seat seat10 = new Seat();
            seat10.Column = 2;
            seat10.Row = 2;
            seats.Add(seat10);
        }

        private void button11_Click(object sender, RoutedEventArgs e)
        {
            button11.Background = Brushes.Red;
            Seat seat11 = new Seat();
            seat11.Column = 3;
            seat11.Row = 2;
            seats.Add(seat11);
        }

        private void button12_Click(object sender, RoutedEventArgs e)
        {
            button12.Background = Brushes.Red;
            Seat seat12 = new Seat();
            seat12.Column = 4;
            seat12.Row = 2;
            seats.Add(seat12);
        }

        private void button13_Click(object sender, RoutedEventArgs e)
        {
            button13.Background = Brushes.Red;
            Seat seat13 = new Seat();
            seat13.Column = 5;
            seat13.Row = 2;
            seats.Add(seat13);
        }

        private void button14_Click(object sender, RoutedEventArgs e)
        {
            button14.Background = Brushes.Red;
            Seat seat14 = new Seat();
            seat14.Column = 6;
            seat14.Row = 2;
            seats.Add(seat14);
        }

        private void button15_Click(object sender, RoutedEventArgs e)
        {
            button15.Background = Brushes.Red;
            Seat seat15 = new Seat();
            seat15.Column = 7;
            seat15.Row = 2;
            seats.Add(seat15);
        }

        private void button16_Click(object sender, RoutedEventArgs e)
        {
            button16.Background = Brushes.Red;
            Seat seat16 = new Seat();
            seat16.Column = 8;
            seat16.Row = 2;
            seats.Add(seat16);
        }

        private void button44_Click(object sender, RoutedEventArgs e)
        {
            button44.Background = Brushes.Red;
            Seat seat44 = new Seat();
            seat44.Column = 9;
            seat44.Row = 2;
            seats.Add(seat44);
        }

        private void button45_Click(object sender, RoutedEventArgs e)
        {
            button45.Background = Brushes.Red;
            Seat seat45 = new Seat();
            seat45.Column = 10;
            seat45.Row = 2;
            seats.Add(seat45);
        }

        private void button17_Click(object sender, RoutedEventArgs e)
        {
            button17.Background = Brushes.Red;
            Seat seat17 = new Seat();
            seat17.Column = 1;
            seat17.Row = 3;
            seats.Add(seat17);
        }

        private void button18_Click(object sender, RoutedEventArgs e)
        {
            button18.Background = Brushes.Red;
            Seat seat18 = new Seat();
            seat18.Column = 2;
            seat18.Row = 3;
            seats.Add(seat18);
        }

        private void button19_Click(object sender, RoutedEventArgs e)
        {
            button19.Background = Brushes.Red;
            Seat seat19 = new Seat();
            seat19.Column = 3;
            seat19.Row = 3;
            seats.Add(seat19);
        }

        private void button20_Click(object sender, RoutedEventArgs e)
        {
            button20.Background = Brushes.Red;
            Seat seat20 = new Seat();
            seat20.Column = 4;
            seat20.Row = 3;
            seats.Add(seat20);
        }

        private void button21_Click(object sender, RoutedEventArgs e)
        {
            button21.Background = Brushes.Red;
            Seat seat21 = new Seat();
            seat21.Column = 5;
            seat21.Row = 3;
            seats.Add(seat21);
        }

        private void button22_Click(object sender, RoutedEventArgs e)
        {
            button22.Background = Brushes.Red;
            Seat seat22 = new Seat();
            seat22.Column = 6;
            seat22.Row = 3;
            seats.Add(seat22);
        }

        private void button23_Click(object sender, RoutedEventArgs e)
        {
            button23.Background = Brushes.Red;
            Seat seat23 = new Seat();
            seat23.Column = 7;
            seat23.Row = 3;
            seats.Add(seat23);
        }

        private void button24_Click(object sender, RoutedEventArgs e)
        {
            button24.Background = Brushes.Red;
            Seat seat24 = new Seat();
            seat24.Column = 8;
            seat24.Row = 3;
            seats.Add(seat24);
        }

        private void button46_Click(object sender, RoutedEventArgs e)
        {
            button46.Background = Brushes.Red;
            Seat seat46 = new Seat();
            seat46.Column = 9;
            seat46.Row = 3;
            seats.Add(seat46);
        }

        private void button47_Click(object sender, RoutedEventArgs e)
        {
            button47.Background = Brushes.Red;
            Seat seat47 = new Seat();
            seat47.Column = 10;
            seat47.Row = 3;
            seats.Add(seat47);
        }

        private void button25_Click(object sender, RoutedEventArgs e)
        {
            button25.Background = Brushes.Red;
            Seat seat25 = new Seat();
            seat25.Column = 1;
            seat25.Row = 4;
            seats.Add(seat25);
        }

        private void button26_Click(object sender, RoutedEventArgs e)
        {
            button26.Background = Brushes.Red;
            Seat seat26 = new Seat();
            seat26.Column = 2;
            seat26.Row = 4;
            seats.Add(seat26);
        }

        private void button27_Click(object sender, RoutedEventArgs e)
        {
            button27.Background = Brushes.Red;
            Seat seat27 = new Seat();
            seat27.Column = 3;
            seat27.Row = 4;
            seats.Add(seat27);
        }

        private void button28_Click(object sender, RoutedEventArgs e)
        {
            button28.Background = Brushes.Red;
            Seat seat28 = new Seat();
            seat28.Column = 4;
            seat28.Row = 4;
            seats.Add(seat28);
        }

        private void button29_Click(object sender, RoutedEventArgs e)
        {
            button29.Background = Brushes.Red;
            Seat seat29 = new Seat();
            seat29.Column = 5;
            seat29.Row = 4;
            seats.Add(seat29);
        }

        private void button30_Click(object sender, RoutedEventArgs e)
        {
            button30.Background = Brushes.Red;
            Seat seat30 = new Seat();
            seat30.Column = 6;
            seat30.Row = 4;
            seats.Add(seat30);
        }

        private void button31_Click(object sender, RoutedEventArgs e)
        {
            button31.Background = Brushes.Red;
            Seat seat31 = new Seat();
            seat31.Column = 7;
            seat31.Row = 4;
            seats.Add(seat31);
        }

        private void button48_Click(object sender, RoutedEventArgs e)
        {
            button48.Background = Brushes.Red;
            Seat seat48 = new Seat();
            seat48.Column = 9;
            seat48.Row = 4;
            seats.Add(seat48);
        }

        private void button49_Click(object sender, RoutedEventArgs e)
        {
            button49.Background = Brushes.Red;
            Seat seat49 = new Seat();
            seat49.Column = 10;
            seat49.Row = 4;
            seats.Add(seat49);
        }

        private void button33_Click(object sender, RoutedEventArgs e)
        {
            button33.Background = Brushes.Red;
            Seat seat33 = new Seat();
            seat33.Column = 1;
            seat33.Row = 5;
            seats.Add(seat33);
        }

        private void button34_Click(object sender, RoutedEventArgs e)
        {
            button34.Background = Brushes.Red;
            Seat seat34 = new Seat();
            seat34.Column = 2;
            seat34.Row = 5;
            seats.Add(seat34);
        }

        private void button35_Click(object sender, RoutedEventArgs e)
        {
            button35.Background = Brushes.Red;
            Seat seat35 = new Seat();
            seat35.Column = 3;
            seat35.Row = 5;
            seats.Add(seat35);
        }

        private void button36_Click(object sender, RoutedEventArgs e)
        {
            button36.Background = Brushes.Red;
            Seat seat36 = new Seat();
            seat36.Column = 4;
            seat36.Row = 5;
            seats.Add(seat36);
        }

        private void button37_Click(object sender, RoutedEventArgs e)
        {
            button37.Background = Brushes.Red;
            Seat seat37 = new Seat();
            seat37.Column = 5;
            seat37.Row = 5;
            seats.Add(seat37);
        }

        private void button38_Click(object sender, RoutedEventArgs e)
        {
            button38.Background = Brushes.Red;
            Seat seat38 = new Seat();
            seat38.Column = 6;
            seat38.Row = 5;
            seats.Add(seat38);
        }

        private void button39_Click(object sender, RoutedEventArgs e)
        {
            button39.Background = Brushes.Red;
            Seat seat39 = new Seat();
            seat39.Column = 7;
            seat39.Row = 5;
            seats.Add(seat39);
        }

        private void button40_Click(object sender, RoutedEventArgs e)
        {
            button40.Background = Brushes.Red;
            Seat seat40 = new Seat();
            seat40.Column = 8;
            seat40.Row = 5;
            seats.Add(seat40);
        }

        private void button50_Click(object sender, RoutedEventArgs e)
        {
            button50.Background = Brushes.Red;
            Seat seat50 = new Seat();
            seat50.Column = 9;
            seat50.Row = 5;
            seats.Add(seat50);
        }

        private void button51_Click(object sender, RoutedEventArgs e)
        {
            button51.Background = Brushes.Red;
            Seat seat51 = new Seat();
            seat51.Column = 10;
            seat51.Row = 5;
            seats.Add(seat51);
        }

        private void button52_Click(object sender, RoutedEventArgs e)
        {
            button52.Background = Brushes.Red;
            Seat seat52 = new Seat();
            seat52.Column = 1;
            seat52.Row = 6;
            seats.Add(seat52);
        }

        private void button53_Click(object sender, RoutedEventArgs e)
        {
            button53.Background = Brushes.Red;
            Seat seat53 = new Seat();
            seat53.Column = 2;
            seat53.Row = 6;
            seats.Add(seat53);
        }

        private void button55_Click(object sender, RoutedEventArgs e)
        {
            button55.Background = Brushes.Red;
            Seat seat55 = new Seat();
            seat55.Column = 4;
            seat55.Row = 6;
            seats.Add(seat55);
        }

        private void button56_Click(object sender, RoutedEventArgs e)
        {
            button56.Background = Brushes.Red;
            Seat seat56 = new Seat();
            seat56.Column = 5;
            seat56.Row = 6;
            seats.Add(seat56);
        }

        private void button57_Click(object sender, RoutedEventArgs e)
        {
            button57.Background = Brushes.Red;
            Seat seat57 = new Seat();
            seat57.Column = 6;
            seat57.Row = 6;
            seats.Add(seat57);
        }

        private void button58_Click(object sender, RoutedEventArgs e)
        {
            button58.Background = Brushes.Red;
            Seat seat58 = new Seat();
            seat58.Column = 7;
            seat58.Row = 6;
            seats.Add(seat58);
        }

        private void button59_Click(object sender, RoutedEventArgs e)
        {
            button59.Background = Brushes.Red;
            Seat seat59 = new Seat();
            seat59.Column = 8;
            seat59.Row = 6;
            seats.Add(seat59);
        }

        private void button60_Click(object sender, RoutedEventArgs e)
        {
            button60.Background = Brushes.Red;
            Seat seat60 = new Seat();
            seat60.Column = 9;
            seat60.Row = 6;
            seats.Add(seat60);
        }

        private void button61_Click(object sender, RoutedEventArgs e)
        {
            button61.Background = Brushes.Red;
            Seat seat61 = new Seat();
            seat61.Column = 10;
            seat61.Row = 6;
            seats.Add(seat61);
        }

        private void button41_Click(object sender, RoutedEventArgs e)
        {

        }

        private void button62_Click(object sender, RoutedEventArgs e)
        {
            service.ReserveSeats(seats, showing);
        }
    }
}
